import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import axios from "axios";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);//设置Vue使用Element组件
//设置axios是Vue的属性
Vue.prototype.$axios = axios.create({
  baseURL: 'http://localhost/',//设置axios请求的基础路径
  headers: { 'X-Requested-With': 'XMLHttpRequest' },//指定axios的请求为ajax请求
  withCredentials: true, // 跨域请求是否允许使用凭证
});
Vue.config.productionTip = false;

new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
